package com.alangyun.remind.vo.talent;

public class SudokuCellView implements Comparable<SudokuCellView> {

	/** 人数 * */
	private Integer count=0;
	/** 所占百分比 * */
	private String percent="";
	/** 九宫格结论(评级名称) * */
	private String remark="";
	/** 等级包含的人名 * */
	private String names="";
	/** 所占的九宫格位置 * */
	private Integer cellIndex=-1;
	
	public static SudokuCellView create(int index, String startRemark) {
		SudokuCellView ret = new SudokuCellView();
		ret.cellIndex = index;
		ret.count=0;
		ret.percent="";
		ret.remark=startRemark;
		ret.names="";
		
		return ret;
	}
	

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	public String getPercent() {
		return percent;
	}

	public void setPercent(String percent) {
		this.percent = percent;
	}

	public String getRemark() {
		return remark;
	}


	public void setRemark(String remark) {
		this.remark = remark;
	}


	public String getNames() {
		return names;
	}

	public void setNames(String names) {
		this.names = names;
	}

	public Integer getCellIndex() {
		return cellIndex;
	}

	public void setCellIndex(Integer cellIndex) {
		this.cellIndex = cellIndex;
	}

	public int incCount() {
		if(count==null)
			count=1;
		else
			++count;
		
		return count;
	}
	
	public String addName(String name) {
		if(names==null||names.length()==0)
			names= name;
		else
			names=names+", "+name;
		
		return names;
	}
	
	@Override
	public int compareTo(SudokuCellView that) {
		return this.count- that.count;
	}
	
}
